package com.scedu.config;

import com.scedu.pojo.User;
import com.sun.corba.se.spi.oa.NullServant;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/*
配置类
 */
@Configuration //替代beans.xml
@ComponentScan("com.scedu.pojo") //指定要扫描的包 相当于
//<!--    指定要扫描的包，这个包下的注解就会生效-->
// <context:component-scan base-package="com.scedu.entity" />
public class MyConfig {
    @Bean //相当于  <bean id="user" class="com.scedu.entity.User">
    public User user()
    {
        return  new User();
    }
}
